package xyz.shenmegui.foodcheckserver.VO;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import xyz.shenmegui.foodcheckserver.DO.Compound;
import xyz.shenmegui.foodcheckserver.DO.Record;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class RecordDetail {

    private int id;

    private int uid;

    private String name;

    private List<Compound> compounds;

    private int flag;

    private int deleted;

    public RecordDetail(Record record, List<Compound> compounds) {
        this.id = record.getId();
        this.uid = record.getUid();
        this.name = record.getName();
        this.compounds = compounds;
        this.flag = record.getFlag();
        this.deleted = record.getDeleted();
    }
}
